<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2023/12/8
  Time: 23:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.example.ending_demo.model.Address" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link type="text/css" href="css/bootstrap.min.css" rel="stylesheet"/>
    <link type="text/css" href="css/mystyles.css" rel="stylesheet"/>
    <title>地址管理</title>
</head>
<body>
<%@ include file="header.jsp"%>


<div class="width-80">
    <h3>个人通讯录</h3>
    <div class="min-height">
        <table class="table table-hover">
            <thead>
            <tr>
                <th>#</th>
                <th>姓名</th>
                <th>手机号码</th>
                <th>邮箱地址</th>
                <th>通讯地址</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
  <c:forEach var="addr" items="${requestScope.addressList}">
    <tr>
        <th scope="row">${addr.address_id}</th>
        <td>${addr.addr_username}</td>
        <td>${addr.addr_phone}</td>
        <td>${addr.addr_email}</td>
        <td>${addr.address}</td>
        <td>
            <a type="button" href="AddressEditServlet?id=${addr.address_id}"  class="btn btn-info">编辑</a>
            <a type="button" class="btn btn-danger" >删除</a>
        </td>
    </tr>
  </c:forEach>
            </tbody>
        </table>
    </div>
</div>
<%--分页栏--%>
<div class="text-center">
    <ul class="pagination">
        <li>
            <a href="#" aria-label="Previous">
                <span aria-hidden="true">&laquo;</span>
            </a>
        </li>

        <li><a href="#">1</a></li>
        <li><a href="#">2</a></li>
        <li><a href="#">3</a></li>
        <li><a href="#">4</a></li>
        <li><a href="#">5</a></li>
        <li>
            <a href="#" aria-label="Next">
                <span aria-hidden="true">&raquo;</span>
            </a>
        </li>
    </ul>

</div>
<%@ include file="footer.jsp"%>
<script type="text/javascript" src="js/jquery-3.6.1.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>
